package com.sc.nft.feign;

import com.sc.nft.dto.IdRequest;
import com.sc.nft.req.redeemcard.RedeemCardPageReq;
import com.sc.nft.req.redeemcard.RedeemCardReq;
import com.sc.nft.req.redeemcard.RedeemCardRuleReq;
import com.sc.nft.sup.PageRequest;
import com.sc.nft.sup.PageResult;
import com.sc.nft.sup.Result;
import com.sc.nft.vo.redeemcard.RedeemCardDetailsVO;
import com.sc.nft.vo.redeemcard.RedeemCardPageVO;
import com.sc.nft.vo.redeemcard.RedeemCardWebDetailsVO;
import com.sc.nft.vo.redeemcard.RedeemCardWebPageVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;


/**
 * @author JYT
 * @create 2024/4/27 11:29
 */
@FeignClient(name = "meta-mall-mini-app", path = "/wxMiniMall/redeemCard")
public interface WxMiniRedeemCardClient {

    /**
     * 小程序兑换卡创建
     * @param request
     * @return
     */
    @PostMapping(value = "/create", produces = MediaType.APPLICATION_JSON_VALUE)
    Result create(RedeemCardReq request);
    /**
     * 小程序兑换卡编辑
     * @param request
     * @return
     */
    @PostMapping(value = "/update", produces = MediaType.APPLICATION_JSON_VALUE)
    Result update(RedeemCardReq request);


    /**
     * 上架兑换卡
     * @param request
     * @return
     */
    @PostMapping(value = "/enable", produces = MediaType.APPLICATION_JSON_VALUE)
    Result enable(IdRequest request);

    /**
     * 下架兑换卡
     * @param request
     * @return
     */
    @PostMapping(value = "/disable", produces = MediaType.APPLICATION_JSON_VALUE)
    Result disable(IdRequest request);


    /**
     * 删除兑换卡
     * @param request
     * @return
     */
    @PostMapping(value = "/remove", produces = MediaType.APPLICATION_JSON_VALUE)
    Result remove(IdRequest request);

    /**
     * 小程序兑换卡详情
     * @param request
     * @return
     */
    @PostMapping(value = "/details", produces = MediaType.APPLICATION_JSON_VALUE)
    RedeemCardDetailsVO homeDetails(IdRequest request);


    /**
     * 小程序兑换卡列表
     * @param request
     * @return
     */
    @PostMapping(value = "/adminPage", produces = MediaType.APPLICATION_JSON_VALUE)
    PageResult<RedeemCardPageVO> adminPage(RedeemCardPageReq request);


    /**
     * 小程序用户端兑换卡列表
     * @param request
     * @return
     */
    @PostMapping(value = "/webPage", produces = MediaType.APPLICATION_JSON_VALUE)
    PageResult<RedeemCardWebPageVO> webPage(PageRequest request);


    /**
     * 用户端兑换卡详情
     * @param request
     * @return
     */
    @PostMapping(value = "/webDetails", produces = MediaType.APPLICATION_JSON_VALUE)
    Result<RedeemCardWebDetailsVO> webDetails(IdRequest request);


    /**
     * 兑换卡使用规则
     * @param request
     * @return
     */
    @PostMapping(value = "/ruleSave", produces = MediaType.APPLICATION_JSON_VALUE)
    Result ruleSave(RedeemCardRuleReq request);

    /**
     * 兑换卡使用规则
     * @return
     */
    @PostMapping(value = "/ruleGet", produces = MediaType.APPLICATION_JSON_VALUE)
    Result<String> ruleGet();


}
